<?php
declare (strict_types = 1);

namespace app\controller\admin;

use think\Request;
use app\common\model\Admin as M;

/**
 * 管理员信息
 */
class Admin extends Common
{


    //获取用户信息
    public function getInfo()
    {
        $user = [
            'avatar'=>$this->admin->avatar,
            'nick_name'=>$this->admin->nick_name
        ];
        $roles = ["admin"];
        $permissions = ['*:*:*'];
        return success(['user'=>$user, 'roles'=>$roles, 'permissions'=>$permissions]);
    }

    //管理员退出
    public function logout()
    {
        return success();
    }




}
